import request from '@/utils/request'

export function teacherCreateToken(params) {
  return request({
    url: '/testApi/teacher/createToken',
    method: 'get',
    params: params
  })
}

export function loginByOpenid(params) {
  return request({
    url: '/openApi/teacher/loginByOpenid',
    method: 'get',
    params: params
  })
}

export function getOpenid(params) {
  return request({
    url: '/openApi/teacher/getOpenid',
    method: 'get',
    params: params
  })
}

export function teacherFindTeacher(params) {
  return request({
    url: '/teacherApi/teacher/findTeacher',
    method: 'get',
    params: params
  })
}

export function teacherUpdateTeacher(data) {
  return request({
    url: '/teacherApi/teacher/updateTeacher',
    method: 'put',
    data: data
  })
}

export function openUpdateTeacherByMobilePhone(data) {
  return request({
    url: '/openApi/teacher/updateTeacherByMobilePhone',
    method: 'put',
    data: data
  })
}

export function teacherFindTeacherAndSchool(params) {
  return request({
    url: '/teacherApi/teacher/findTeacherAndSchool',
    method: 'get',
    params: params
  })
}

export function userSelectTeacherByStudentTeam(params) {
  return request({
    url: '/userApi/teacher/selectTeacherByStudentTeam',
    method: 'get',
    params: params
  })
}